/**
 * SerialTree.java created by zhangzhidong 
 * at 下午12:16:52 2016年4月20日
 */
package algorithm.CIG.binarytree;

import java.util.function.Consumer;

import algorithm.CIG.base.TreeBase;
import algorithm.CIG.base.TreeNode;

/**
 * @author zhangzhidong
 *
 */
public class SerialTree extends TreeBase {
	public static void main(String args[]){
		Consumer<TreeNode> c = System.out::println;
		String tree = "1!2!3!4!#!#!5!#!#!#!#!";
		TreeNode tn = reConTree(tree);
		preTraverseTree(tn, c);
		System.out.println("--------------");
		inTraverseTree(tn, c);
		System.out.println("--------------");
		postTraverseTree(tn, c);
		System.out.println("--------------");
	}
}
